<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $this->_var['lang']['cp_home']; ?><?php if ($this->_var['ur_here']): ?> - <?php echo $this->_var['ur_here']; ?><?php endif; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />

<style type="text/css">
body {
  color: white;
}
</style>

<?php echo $this->smarty_insert_scripts(array('files'=>'../js/utils.js,validator.js')); ?>
<script language="JavaScript">
<!--
// 这里把JS用到的所有语言都赋值到这里
<?php $_from = $this->_var['lang']['js_languages']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

if (window.parent != window)
{
  window.top.location.href = location.href;
}

//-->
</script>
</head>
<body style="background: #3f6996">
<div class="ec_loginBox">
    <img src="images/login_img.png" class="ec_img" />
	<div class="ec_logincon">
    	<form method="post" action="privilege.php" name='theForm' onsubmit="return validate()">
    	<div class="ec_checkBox">
        	<label><?php echo $this->_var['lang']['label_username']; ?></label>
            <input type="text" class="ip1" name="username" />
        </div>
        <div class="ec_checkBox">
        	<label><?php echo $this->_var['lang']['label_password']; ?></label>
            <input type="password" class="ip1" name="password"  />
        </div>
        <?php if ($this->_var['gd_version'] > 0): ?>
        <div class="ec_checkBox">
        	<label><?php echo $this->_var['lang']['label_captcha']; ?></label>
            <input type="text" class="ip2" name="captcha" />
            <a href="javascript:void(0)"><img src="index.php?act=captcha&<?php echo $this->_var['random']; ?>" width="150" height="27"  onclick= this.src="index.php?act=captcha&"+Math.random() /></a>
        </div>
        <?php endif; ?>
        <div class="ec_checkBox" style="padding-left:23px;">
            <label for="remember">
            <input type="checkbox" class="ip3" value="1" name="remember" id="remember" />
            <?php echo $this->_var['lang']['remember']; ?>
            </label>
        </div>
        <div class="ec_checkBox">
            <input type="submit" class="ip4" value="<?php echo $this->_var['lang']['signin_now']; ?>"/>
        </div>
        <div class="ec_checkBox">
            <a href="../" class="shouye" title="<?php echo $this->_var['lang']['back_home']; ?>"><?php echo $this->_var['lang']['back_home']; ?></a>
            <a href="get_password.php?act=forget_pwd" class="forget" title="<?php echo $this->_var['lang']['forget_pwd']; ?>"><?php echo $this->_var['lang']['forget_pwd']; ?></a>
        </div>
        <input type="hidden" name="act" value="signin" />
        </form>
    </div>
</div>

<script language="JavaScript">
<!--
  document.forms['theForm'].elements['username'].focus();
  
  /**
   * 检查表单输入的内容
   */
  function validate()
  {
    var validator = new Validator('theForm');
    validator.required('username', user_name_empty);
    //validator.required('password', password_empty);
    if (document.forms['theForm'].elements['captcha'])
    {
      validator.required('captcha', captcha_empty);
    }
    return validator.passed();
  }
  
//-->
</script>
</body>